50b84e
@@ -15,6 +15,9 @@
  */
 package org.springframework.data.web;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.springframework.beans.BeansException;
 import org.springframework.beans.MutablePropertyValues;
 import org.springframework.beans.factory.BeanClassLoaderAware;
@@ -22,9 +25,11 @@
import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.BeanFactoryAware;
 import org.springframework.context.ResourceLoaderAware;
 import org.springframework.core.MethodParameter;
+import org.springframework.core.annotation.AnnotatedElementUtils;
 import org.springframework.core.convert.ConversionService;
 import org.springframework.core.io.ResourceLoader;
 import org.springframework.data.projection.SpelAwareProxyProjectionFactory;
+import org.springframework.util.ClassUtils;
 import org.springframework.web.bind.WebDataBinder;
 import org.springframework.web.bind.support.WebDataBinderFactory;
 import org.springframework.web.context.request.NativeWebRequest;
@@ -40,6 +45,8 @@
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
 public class ProxyingHandlerMethodArgumentResolver extends ModelAttributeMethodProcessor
 		implements BeanFactoryAware, ResourceLoaderAware, BeanClassLoaderAware {
 
+	private static final List<String> IGNORED_PACKAGES = Arrays.asList("java", "org.springframework");
+
 	private final SpelAwareProxyProjectionFactory proxyFactory;
 	private final ConversionService conversionService;
 
@@ -90,7 +97,31 @@
public class ProxyingHandlerMethodArgumentResolver extends ModelAttributeMethodP
 	 */
 	@Override
 	public boolean supportsParameter(MethodParameter parameter) {
-		return parameter.getParameterType().isInterface();
+
+		Class<?> type = parameter.getParameterType();
+
+		if (!type.isInterface()) {
+			return false;
+		}
+
+		// Annotated parameter
+		if (parameter.getParameterAnnotation(ProjectedPayload.class) != null) {
+			return true;
+		}
+
+		// Annotated type
+		if (AnnotatedElementUtils.findMergedAnnotation(type, ProjectedPayload.class) != null) {
+			return true;
+		}
+
+		// Fallback for only user defined interfaces
+		for (String prefix : IGNORED_PACKAGES) {
+			if (ClassUtils.getPackageName(type).startsWith(prefix)) {
+				return false;
+			}
+		}
+
+		return true;
 	}
 
 	/* 
